// xfImgBit.h: interface for the xfImgBitMan class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_xfImgBitMAN_H__83557D62_7F3C_4tttt526_F84AC7698E2B__INCLUDED_)
#define AFX_xfImgBitMAN_H__83557D62_7F3C_4tttt526_F84AC7698E2B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "DD_ImgCfg.h"
#include "DD_AnalyCfg.h"
#include "ImageTIF.h"

#define MAX_UNDO_LEVELS 10

class xfImgBit  
{
public:
	xfImgBit()
	{
	}
	virtual ~xfImgBit()
	{
	}

public:
	virtual int Initialize() = 0;
	virtual int SetImgBit(zkImgBitInfo *pImgInfo) = 0;
	virtual int SetImgBuffer(zkImgBitInfo *pImgInfo,BOOL bShareMem = TRUE) = 0;
	virtual int GetImageSize(int &nWidth,int &nHeight) = 0;
	virtual int Operate(void *pMethod) = 0;
	virtual int GetHistogramInfo(int nWindow,zkImgHistogram **ppHistogram) = 0;

public:
	virtual int LoadFile(char *pFileName) = 0;
	virtual int SaveFile(char *pFileName) = 0;

public:
	virtual int GetOrgImgBuffer(zkImgBitInfo **ppImgInfo) = 0;
	virtual int GetImgBuffer(zkImgBitInfo **ppImgInfo) = 0;

public:
	virtual int CreateKeyPoint(void *pCfg = NULL){return 0;}

public:
	virtual int GetAdjustThreshold(void *pRefImgBit,void *pCfg,float *pfThM){return 0;}

public:
	virtual int AdjustImage(void *pRefImgBit,void *pCfg = NULL,float *pfThM = NULL){return 0;}
	virtual int CreateAdjustEdges(void *pCfg = NULL) {return 0;}
	virtual int SubImage(void *pRefImgBit,void *pRef = NULL){return 0;}
	virtual int DeleteEdges(void *pRefEdgeHead,void *pCfg = NULL){return 0;}
	virtual int Analysis(void *pRefImgBit,void *pRef = NULL,void *pRet = NULL){return 0;}

public:
	virtual int DelSubDefect(void *pVoid = NULL){return 0;}
	virtual int RestorSubDefect(void *pVoid = NULL){return 0;}


public:
	virtual int SaveTempFile(char *pFileName){return 0;}

};

xfImgBit* CreateImgBit8();
xfImgBit* CreateImgBit16();


#endif // !defined(AFX_xfImgBitMAN_H__83557D62_7F3C_4tttt526_F84AC7698E2B__INCLUDED_)
